<template>
	<view>
		<button type="primary" style="margin-top: 30rpx;" @click="getLog">查看日志</button>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				uuid: uni.getStorageSync('deviceUUID'),
			}
		},
		onLoad: () => {
			/* uni.getStorageSync('deviceUUID')
			console.log(deviceUUID) */
		},
		methods: {
			getLog() {
				uni.request({
					url: this.$baseUrl + '/user/device/get/logs/'+ uni.getStorageSync('deviceUUID'),
					method: 'GET',
					header: {
						// 'content-type': 'application/x-www-form-urlencoded',
						'token': uni.getStorageSync('token')
					},
					success: (res) => {
						console.log('Response:', res); // 日志记录响应
					},
					fail: (error) => {
						console.log('Request Failed:', error); // 日志记录错误
					}
				})
			}
			
		}
	}
</script>

<style>

</style>
